<template>
	<div>
		<TypeNav />
		<ListContainer />
		<!-- 今日推荐 -->
		<TodayRecommend />
		<!-- 热门排行 -->
		<CommodityRank />
		<!-- 猜你喜欢 -->
		<GuessLike />
		<!-- 推送 -->
		<FloorPush v-for="value in floorListObj" :key="value.id" :list="value" />
		<!-- 品牌直达 -->
		<BrandDirect />
	</div>
</template>

<script>
import ListContainer from '@/pages/Home/ListContainer';
import TodayRecommend from '@/pages/Home/TodayRecommend';
import CommodityRank from '@/pages/Home/CommodityRank';
import GuessLike from '@/pages/Home/GuessLike';
import FloorPush from '@/pages/Home/FloorPush';
import BrandDirect from '@/pages/Home/BrandDirect';
import { mapState } from 'vuex';

export default {
	name: 'AppHome',
	components: {
		ListContainer,
		TodayRecommend,
		CommodityRank,
		GuessLike,
		FloorPush,
		BrandDirect,
	},
	computed: {
		...mapState('home', ['floorListObj']),
	},
	mounted() {
		// 派发action 接收floor数据
		this.$store.dispatch('home/getFloorList');
	},
};
</script>

<style></style>
